Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 2 - Geometric Shapes / Geometric Shapes Reference
Functions


Drawing Geometric Shapes

The QuickDraw GX drawing functions compile all of the information in a shape's properties, and the properties of its style, ink, and transform objects, and produce a graphic image. Therefore, to understand how these functions draw geometric shapes, you need to be familiar with much of the information in Inside Macintosh: QuickDraw GX Objects, as well as much of the information in this chapter and in the next chapter, "Geometric Styles." The function descriptions in this section give an overview of the process these functions use to draw geometric shapes.

If you want to draw a geometric shape without creating a shape object--that is, just given a geometry--you can use the GXDrawPoint, GXDrawLine, GXDrawCurve, GXDrawRectangle, GXDrawPolygons, or GXDrawPaths functions, which are described in this section. These functions create a shape object, initialize it, draw it, and dispose of it; therefore, they do not take advantage of the QuickDraw GX caching mechanism. You should make limited use of these functions--for example, you could use one of these functions if you wanted to draw a particular shape drawn only once.

To draw a shape once you have created a shape object and modified its properties to suit your needs, you can use the GXDrawShape function. This function draws all shape types, and is described in the chapter "Shape Objects" in Inside Macintosh: QuickDraw GX Objects.

When debugging your application, you can use the GXGetDrawError function, which is described in the chapter "QuickDraw GX Debugging" in Inside Macintosh: QuickDraw GX Environment and Utilities, for hints when a shape fails to draw as expected.


Subtopics
GXDrawPoint
GXDrawLine
GXDrawCurve
GXDrawRectangle
GXDrawPolygons
GXDrawPaths

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help